<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:c="livcos.org/ns/cosmos"
  xmlns:job="livcos.org/ns/process/job"
  exclude-result-prefixes="c">

  <xsl:param name="objId"/>
  <xsl:param name="responseId"/>

  <xsl:template match="/">
    <xsl:variable name="responseObjId">
      <xsl:value-of select="$responseId"/>
      <xsl:if test="normalize-space($responseId) = ''">
        <xsl:text>/livcos.org/web/admin/cosmos.view</xsl:text>
      </xsl:if>
    </xsl:variable>
    <job:clear ref="{$objId}" />
    <job:feed ref="{$responseObjId}" stream="response" base="job" content-type="html">
      <job:param name="objId" value="{$objId}"/>
    </job:feed>
  </xsl:template>
  
</xsl:stylesheet>
